//
//  ZFMapManager.swift
//  map
//
//  Created by fyzq on 2024/1/24.
//

import UIKit
import MapboxMaps
/**
 info MBXAccessToken :
 */

class ZFMapManager: NSObject {
    private static var accessToken = "sk.eyJ1Ijoic3UxcXVuIiwiYSI6ImNsbnd3Zmt4MzBmaDcybW14NHZxNGd4OGkifQ.SR6Llr384Mx-qGbxwjX_NA"
    static let defaultLocation  = CLLocationCoordinate2D(latitude: 36.2602, longitude: 117.1235);
    var cancellables = Set<AnyCancelable>()
    var mapView:MapView?

    init(mapView:MapView) {
        super.init()
        self.mapView = mapView;
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    static func setupDefault(){
        MapboxOptions.accessToken = accessToken;
        
//        MapboxMapsOptions.dataPath = customDataPathURL
//        MapboxMapsOptions.assetPath = customAssetPathURL
//        MapboxMapsOptions.tileStoreUsageMode = .readOnly
//        MapboxMapsOptions.tileStore = tileStore

    }
    
    func defalut(){
        guard let mapView = mapView else {
            return
        }
        mapView.ornaments.options.compass.position = OrnamentPosition.topLeft;
        mapView.ornaments.options.scaleBar.visibility = .hidden
        mapView.ornaments.logoView.isHidden = true;
        mapView.ornaments.options.logo.margins = CGPoint.init(x: 10000, y: 10000)
        mapView.ornaments.attributionButton.isHidden = true
        mapView.ornaments.options.attributionButton.margins = CGPoint.init(x: 10000, y: 10000)
    }
    
    
}





